import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'

export default [
  {
    name: 'app/files-to-lint',
    files: ['**/*.{ts,mts,tsx,vue}']
  },

  {
    name: 'app/files-to-ignore',
    ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**']
  },
  ...pluginVue.configs['flat/essential'],
  ...vueTsEslintConfig(),
  skipFormatting,
  // 加入 Prettier 配置
  {
    extends: [
      'plugin:prettier/recommended' // 启用 prettier 的推荐配置
    ]
  },
  // 在配置中加入禁用规则
  {
    rules: {
      'vue/multi-word-component-names': 'off' // 禁用单词命名规则
    }
  }
]
